package com.qf.bean;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class Account {
    private Integer aid;

    @NotNull(message = "请选择记账事项")
    private Integer itemId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "请选择业务日期")
    private Date operationDate;

    @NotBlank(message = "请填写关系人")
    private String contact;

    @NotBlank(message = "请填写往来单位")
    private String company;

    @NotBlank(message = "请填写事由")
    private String reason;

    @NotNull(message = "请选择账目类型!(进账/出账)")
    private Integer accountState;

    @NotBlank(message = "请填写相关车辆")
    private String car;

    private String recorder;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date recordeTime;

    @NotNull(message = "请填写金额")
    private Double money;

    private String checkState;

    private String tradeState;

    //映射事项表中的名称字段
    private String itemName;
}